using ShouldIt.Core;

namespace ShouldIt.Clr.Fluent
{
    internal class Check
    {
        public static TTarget IsNull<T, TTarget, TBe>(ShouldBase<T, TTarget, TBe> should, IAssertProvider assertProvider) where T : ShouldBase<T, TTarget, TBe>
        {
            if (should.Negate)
            {
                assertProvider.IsNotNull(should.Target);
            }
            else
            {
                assertProvider.IsNull(should.Target);
            }
            return should.Target;
        }
    }
}